GtkStackSwitcher: Don't emit notify::visible-child when setting a stack
authorDebarshi Ray <debarshir@gnome.org>
Wed, 6 May 2015 14:53:43 +0000 (16:53 +0200)
committerDebarshi Ray <debarshir@gnome.org>
Wed, 6 May 2015 20:31:10 +0000 (22:31 +0200)
commit26b03332a4cd6a08d85a81097762bee4eb21689d
tree983909afd28aef1ea226cdcecbfd8497855599eb
parent6a51ac59f05b01d2fd1def67a6df589de4b423a5
GtkStackSwitcher: Don't emit notify::visible-child when setting a stack

Synchronizing the visible child with the switcher's toggle buttons can
lead to GtkButton::clicked being emitted twice. Once for the button
that was active before, and once for the button that we just activated.
This leads to notify::visible-child being called twice and one of
them is with the wrong child.

Let's deal with this in the same way we handle the visible child
changing underneath us.

https://bugzilla.gnome.org/show_bug.cgi?id=749021
gtk/gtkstackswitcher.c